package com.arouter;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.TextView;

import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.arouter.bean.UserBean;
import com.cjt2325.cameraview.R;

@Route(path = "/test/activity3")
public class ARouterActivity3 extends AppCompatActivity {
    public static final String DATA = "data";

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_arouter3);

        //重点加上这个
        ARouter.getInstance().inject(this);

        findViewById(R.id.btn_setResult).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent();
                intent.putExtra(DATA, 10086);
                setResult(RESULT_OK, intent);
                finish();
            }
        });

    }
}
